/* TCSS 590A - Cybernetics and Systems
 * Group Project - Modeling
 * By Barry Jones, Naren Meadem, Michael Pitts, Yuan Tao
 * Fall 2012, University of Washington, Tacoma
 */
package output;

import java.io.PrintStream;

/**
 * Provides the OutPut functionality to a wrapped PrintStream, such as a file or
 * Console.
 * @author Michael Pitts
 * @version Oct 30, 2012
 */
public class OutPutStream extends OutPutDelineated
{

	/** Is the stream this OutPut will use. */
	final PrintStream my_stream;
	
	/**
	 * Creates a new OutPutStream, which outputs data to the given stream.
	 * @param the_stream is the PrintStream Object to output to.
	 * @param the_new_line will be the new line marker for this OutPut.
	 * @param the_delineator will be the delineator for this OutPut.
	 * @see PrintStream
	 */
	public OutPutStream(final PrintStream the_stream, final String the_new_line, 
			final String the_delineator)
	{
		super(the_new_line, the_delineator);
		my_stream = the_stream;
	}
	
	/**
	 * Creates a new OutPutStream with the default settings.
	 * @param the_stream is the stream for the output.
	 */
	public OutPutStream(final PrintStream the_stream)
	{
		super();
		my_stream = the_stream;
	}

	public void out(final String the_data)
	{
		my_stream.print(the_data);
	}

	public void out(final long the_data)
	{
		my_stream.print(the_data);
	}

	
	public void out(final double the_data)
	{
		my_stream.print(the_data);
	}

	public void close()
	{
		my_stream.close();
	}

}
